package com.leo.oplayer.dao;

import android.content.Context;
import android.content.SharedPreferences;

public class ConfigCenter {
	
	public static final String PRE_NAME = "mycontact";
	
	private static SharedPreferences getSharedPreferences(Context context){
		return context.getSharedPreferences(PRE_NAME, Context.MODE_PRIVATE);
	}
	
	public static void setValue(Context context,String key,String value){
		SharedPreferences.Editor editor = getSharedPreferences(context).edit();
		editor.putString(key, value);
		editor.commit();
	}
	
	public static String getValue(Context context,String key,String defaultValue){
		return getSharedPreferences(context).getString(key, defaultValue);
	}

}
